<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>5.姓名案例--插值语法</title>
        <!-- 引入Vue -->
        <script src="../js/vue.js"></script>
    </head>
    <body>
        <!-- 准备好一个容器-->
        <div id="app">
            姓：<input type="text" v-model="firstName" /><br><br>
            名：<input type="text" v-model="lastName" /><br><br>
            <h1>全名： {{firstName[0].toUpperCase()+firstName.slice(1)}}-  {{lastName[0].toUpperCase()+lastName.slice(1)}}</h1>
        </div>
    </body>

    <script>
        new Vue({
            el:"#app",
            data:{
                firstName:"zhang",
                lastName:"san"
            }
        })
    </script>
</html>